/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package chromafinal;

/**
 *
 * @author Benjamin
 */

//Implements some level objects that are circular

public abstract class LevelBall extends LevelObject {
    

    public int x, y;
    public int size;

    public LevelBall(){}

    public LevelBall(int x, int y)
    {
        this.x = x;
        this.y = y;
    }

    public LevelBall(int x, int y, int size)
    {
        this.x = x;
        this.y = y;
        this.size = size;
    }

    public double distance(Player p)
    {
        int[] pcrds = p.getRelCoords();

        double dist = Math.pow((x-pcrds[0])*(x-pcrds[0]) + (y-pcrds[1])*(y-pcrds[1]),0.5);
        return dist;
    }

    public String makeText(){
            String oput = otype + "\t" + x + "\t" + y + "\t";
            return oput;
    }

}
